<?php
if(!isset($_SESSION['authUserId'])){
    $this->setTemplate('auth');
} else {
    $this->setTemplate('search');
}
?>
<div class="head">Die PetrovLand</div>
<div class="photo">
    <div class="allphoto"><div>
    <?php 
    for($i=0; $i<5; $i++){
        if(is_object($this->photo[$i])){
            $src = $this->photo[$i]->getPathToMini();
            } else {
            $src = './ava.jpg';
            }
        echo "<span class='img'><img src='".$src."'></span>";
    }
        echo "</div><div>";
        for($i=5; $i<10; $i++){
        if(is_object($this->photo[$i])){
            $src = $this->photo[$i]->getPathToMini();
            } else {
            $src = './ava.jpg';
            }
        echo "<span class='img'><img src='".$src."'></span>";
    }
    ?></div>
    </div>
</div>
<div class="paginator">Pagination:
    <?php $b=1; for($i=0; $i<$this->paginator; $i++){
        echo"<span><a href='#' onclick=\"document.location='/&page=$b'\">$b</a></span>";
        $b++;
    }
    ?>
</div>
<div class="hi">You are one my first site. WELCOME!<br>
Made by Petrov D.A. 2012.
</div>